|
|
|
|
|
|
|
Figure 14.21
A complex surface. |
|
|
|
|
|
|
|
|
Like their two-dimensional counterparts, Bezier surfaces are defined by a set of control points. The control points are arranged in a two-dimensional mesh that determines the approximate shape of the surface. Figure 14.22 shows a Bezier surface and its control points. The surface is shown in bold lines. The control points are drawn as large dots connected by fine lines showing which control points are adjacent in the mesh. |
|
|
|
|
|
|
|
|
Notice that the control points touch the surface only at the surface's corners. The control points determine the overall shape of the surface, but the surface generally meets the control points only at the corners. |
|
|
|
|
|
|
|
|
Suppose you have an M+1 by N+1 two-dimensional mesh of control points with coordinates stored in the arrays ControlX(0 To M, 0 To N), ControlY(0 To M, 0 To N), and ControlZ(0 To M, 0 To N). Then the X coordinates of the points on the Bezier surface are given by the equation: |
|
|
|
 |
|
|
|
|
Bi,M(u) = M! / i! / (M - i)! * ui * (1 - u)M-i |
|
|
|
|
|